// JavaScript Document


var mvctmo = 0;
function MVC_settimeout() {
  clearTimeout(mvctmo);
  mvctmo = setTimeout("MVC_timeout()", 5000);
}

function MVC_timeout() {
  MM_swapImage('thecommission','','../images/nav1thecommission.gif',
  				'calendar','','../images/nav1calendar.gif',
				'dris','','../images/nav1dris.gif',
				'dcpcs','','../images/nav1dcpcs.gif',
				'planning','','../images/nav1planning.gif',
				'resourcecenter','','../images/nav1resourcecenter.gif',
				1);
  MM_showHideLayers('n2thecommission','','hide',
  				'n2dris','','hide',
				'ncdcpc','','hide',
				'n2planning','','hide',
				'n2rc','','hide')
  MVC_resetnav();
}

function MVC_resetnav() {
  if (window.location.pathname.substr(0, 5) == "/dris") {
	MM_swapImage('dris', '', '../images/nav3dris.gif');
	MM_showHideLayers('n2dris', '', 'show');
	if (window.location.pathname == "/dris/stepbystep.html") {
		MM_swapImage('stepbystep', '', '../images/dri2stepbystep.gif');
	}
	if (window.location.pathname == "/dris/applying.html") {
		MM_swapImage('applying', '', '../images/dri2applying.gif');
	}
	if (window.location.pathname == "/dris/statusreport.html") {
		MM_swapImage('statusreport', '', '../images/dri2statusreport.gif');
	}
  }
  if (window.location.pathname.substr(0, 14) == "/thecommission") {
	MM_swapImage('thecommission', '', '../images/nav3thecommission.gif');
	MM_showHideLayers('n2thecommission', '', 'show');
	if (window.location.pathname == "/thecommission/background.html") {
		MM_swapImage('background', '', '../images/tc2background.gif');
	}
	if (window.location.pathname == "/thecommission/commissioners.html") {
		MM_swapImage('commissioners', '', '../images/tc2commissioners.gif');
	}
	if (window.location.pathname == "/thecommission/committees.html") {
		MM_swapImage('committees', '', '../images/tc2committees.gif');
	}
	if (window.location.pathname == "/thecommission/staff.html") {
		MM_swapImage('staff', '', '../images/tc2staff.gif');
	}
	if (window.location.pathname == "/thecommission/getinvolved.html") {
		MM_swapImage('getinvolved', '', '../images/tc2getinvolved.gif');
	}
  }
  if (window.location.pathname == "/calendar.html") {
	MM_swapImage('calendar', '', '../images/nav3calendar.gif');
  }
  if (window.location.pathname.substr(0, 6) == "/dcpcs") {
	MM_swapImage('dcpcs', '', '../images/nav3dcpcs.gif');
	MM_showHideLayers('ncdcpc', '', 'show');
	if (window.location.pathname == "/dcpcs/current.html") {
		MM_swapImage('currentdcpc', '', '../images/dcpc2current.gif');
	}
	if (window.location.pathname == "/dcpcs/moratorium.html") {
		MM_swapImage('moratorium', '', '../images/dcpc2moratorium.gif');
	}
	if (window.location.pathname == "/dcpcs/qualifications.html") {
		MM_swapImage('qualifications', '', '../images/dcpc2qualifications.gif');
	}
	if (window.location.pathname == "/dcpcs/stepbystep.html") {
		MM_swapImage('stepbystepdcpc', '', '../images/dcpc2stepbystep.gif');
	}
  }
  if (window.location.pathname.substr(0, 9) == "/planning") {
	MM_swapImage('planning', '', '../images/nav3planning.gif');
	MM_showHideLayers('n2planning', '', 'show');
	if (window.location.pathname == "/planning/current.html") {
		MM_swapImage('currentplan', '', '../images/plan2current.gif');
	}
	if (window.location.pathname == "/planning/comprehensive.html") {
		MM_swapImage('comprehensive', '', '../images/plan2comprehensive.gif');
	}
	if (window.location.pathname == "/planning/economic.html") {
		MM_swapImage('economic', '', '../images/plan2economic.gif');
	}
	if (window.location.pathname == "/planning/gis.html") {
		MM_swapImage('gis', '', '../images/plan2gis.gif');
	}
	if (window.location.pathname == "/planning/management.html") {
		MM_swapImage('management', '', '../images/plan2management.gif');
	}
	if (window.location.pathname == "/planning/openspace.html") {
		MM_swapImage('openspace', '', '../images/plan2openspace.gif');
	}
	if (window.location.pathname == "/planning/ponds.html") {
		MM_swapImage('ponds', '', '../images/plan2ponds.gif');
	}
	if (window.location.pathname == "/planning/transportation.html") {
		MM_swapImage('transportation', '', '../images/plan2transportation.gif');
	}
	if (window.location.pathname == "/planning/water.html") {
		MM_swapImage('water', '', '../images/plan2water.gif');
	}
  }
  if (window.location.pathname.substr(0, 10) == "/resources") {
	MM_swapImage('resourcecenter', '', '../images/nav3resourcecenter.gif');
	MM_showHideLayers('n2rc', '', 'show');
	if (window.location.pathname == "/resources/documents.html") {
		MM_swapImage('resdocs', '', '../images/rc2docs.gif');
	}
	if (window.location.pathname == "/resources/links.html") {
		MM_swapImage('links', '', '../images/rc2links.gif');
	}
	if (window.location.pathname == "/resources/profile.html") {
		MM_swapImage('profile', '', '../images/rc2profile.gif');
	}
  }
}
